const express = require('express');
const userController = require('../controllers/userController');
const authMiddleware = require('../middlewares/authMiddleware');

const router = express.Router();

// 获取用户信息
router.get('/:id', authMiddleware, userController.getUser);

// 创建新用户
router.post('/', userController.createUser);

// 更新用户信息
router.put('/:id', authMiddleware, userController.updateUser);

// 删除用户
router.delete('/:id', authMiddleware, userController.deleteUser);

module.exports = router;
